package com.bdqn.Demo.serivce;

import com.bdqn.Demo.mapper.SysUserMapper;
import com.bdqn.Demo.pojo.SysUser;

import javax.annotation.Resource;

public class SysUserServiceImpl implements SysUserService{

    @Resource
    private SysUserMapper sysUserMapper;
    @Override
    public SysUser getAccountExist(String account) {
        return null;
    }

    @Override
    public SysUser login(String account, String password) throws Exception {
        SysUser sysUser=null;
        sysUser=sysUserMapper.selectByAccount(account);
        if(null!=sysUser){
            if(!sysUser.getPassword().equals(password))
                sysUser=null;
        }
        return sysUser;
    }
}
